package com.itheima05;

/**
 * @author Xiao
 * @date 2021/7/9
 */
public class Teacher extends Person {
    /**
     *      老师和学生(案例)
     *          老师类（子类）
     */
    private String tid;
    public void teach () {
        System.out.println(super.getAge() + "岁的老师" + super.getNmae() + "(工号：" + this.tid + ")在教书。");
    }

    public Teacher(String nmae, int age) {
        super(nmae, age);
    }

    public Teacher() {
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public Teacher(String nmae, int age, String tid) {

        super(nmae, age);
        this.tid = tid;
    }

    public Teacher(String tid) {
        this.tid = tid;
    }
}
